﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AspNetCs.Common;
using AspNetCs.Bll;
using AspNetCs.Model;
using AspNetCs.Enumerations.Channel_Enum;

public partial class Script_CheckIsPwd : BasePage
{
    protected int id = 0;
    protected void Page_Load(object sender, EventArgs e)
    {

        if (Request["id"] != null)
        {
            id = StringHelper.isNumber_int(Request["id"].ToString());
        }
        if (id <= 0)
        {
            Response.Write("location.href='" + configInfo.InstallDir + "';");
        }
        memorial_model md = Memorial_Bll.CreateNew.GetModel(id);
        if (md.IsEncrypt == 1)
        {
            string CookisPwdValue = Cookie.GetValue(Channel_Type.memorial.ToString() + "_" + id.ToString());
            if (CookisPwdValue != id.ToString())
            {
                Response.Write("location.href='" + configInfo.InstallDir + "InputPwd.Aspx?id=" + id + "&RUrl=" + Server.UrlEncode(Request.UrlReferrer.ToString()) + "';");
                Response.End();
            }
        }




    }
}
